<template>
	<view>
		<web-view :src="url" @message="getMessage"></web-view>
	</view>
</template>

<script>
	import {
		getToken
	} from "@/api/user.js"
	export default {
		data() {
			return {
				url: ''
			}
		},
		onLoad(options) {
			this.getToken('1')
			/* console.log("options",options)
			if (options && options.url) {
				this.url = options.url;
			}
			console.log("url",this.url) */
		},
		methods: {
			getMessage(event) {
				uni.showModal({
					content: JSON.stringify(event.detail),
					showCancel: false
				});
			},
			async getToken(options){
				const res = await getToken(options)
				this.url = res.returnObj
			}
		}
	}
</script>

<style lang="scss">

</style>
